<?php
!defined('P_W') && exit('Forbidden');
class PW_TypeDataFlash {
	
	function getData($config) {
		$hid = (int)$config['hid'];
		if (!$hid) return array();
		$num = (int)$config['num'] ? (int) $config['num'] : 5;

		return $this->_getDataFromPushData($hid,$num);

	}
	
	function _getDataFromPushData($hid,$num) {
		$service = House::loadClass('pushdataservice','service');
		$result = array();
		$temp = $service->getOpenPushs($hid,'flash',$num);
		foreach ($temp as $key=>$value) {
			$result[] = array('url'=>$value['url'],'image'=>$value['image'],'title'=>$value['title']);
		}
		return $result;
	}
}
?>